I can't understand where is the problem:
this is the file I would like to compile
------------------------
#include <math.h>
#include <stdlib.h>
int main (){
int c = trunc(17.5);
return c;
}
--------------------------
with this command:
--------------------
gcc -o prova prova.c
----------------------------
and this is the error the compiler gives me.
-----------------------------
/tmp/cc0ZzTZJ.o: In function `main':
/tmp/cc0ZzTZJ.o(.tex t+0x32): undefined reference to `trunc'
collect2: ld returned 1 exit status
------------------------------------------------
this is the file I would like to compile
------------------------
#include <math.h>
#include <stdlib.h>
int main (){
int c = trunc(17.5);
return c;
}
--------------------------
with this command:
--------------------
gcc -o prova prova.c
----------------------------
and this is the error the compiler gives me.
-----------------------------
/tmp/cc0ZzTZJ.o: In function `main':
/tmp/cc0ZzTZJ.o(.tex t+0x32): undefined reference to `trunc'
collect2: ld returned 1 exit status
------------------------------------------------
Comment